package com.youyu.core.jms.kafka.serializer;

import com.alibaba.fastjson.JSONObject;

import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;

/**
 * <p>Author:  dxj</p>
 * <p>Date:2017/8/25 15:22</p>
 * <p>Description:反系列化</p>
 * <p>Copyright: Copyright (c) 2017</p>
 * <p>Company: youyu</p>
 */
public class DefaultDeserializer{
	
	public static JSONObject fromBytes(byte[] value) throws Exception {
		return (JSONObject)new ObjectInputStream(new ByteArrayInputStream(value)).readObject();
	}
}
